import request from '../uitls/request'

//通过用户Id查询
export function getUserById(id) {
    return request.get(`/user/${id}`)
}
//查询所有用户信息
export function getUsers(param) {
    return request.get(`/user`,{params:param})
}
//添加用户
export function addUser(data){
    return request.post(`/user`,data)
}
//修改用户信息
export function editUser(id,data){
    return request.put(`/user/${id}`,data)
}

//登录Token
export function login(data){
    return request.post(`/user/token`,data)
}
//查询
export function foundUser(param){
    return request.get(`/user/found`,{params:param})
}
//伪删除
export function deleteUser(id){
    return request.delete(`/user/${id}`)
}